home *** CD-ROM | disk | FTP | other *** search
/ Dos/V Magazine 1995 October 15 / CD [VMAG951015].bin / _demo / nekodemo / rtrv / shared.dir / 00352_MovieForPhoto.ls < prev    next >
Encoding:
Text File  |  1995-05-10  |  6.9 KB  |  271 lines

  1. on getpoemname a, n, c, e
  2.   global gextension
  3.   set thenumber to count(a)
  4.   if (n + 1) > thenumber then
  5.     beep(1)
  6.     put "ERROR !!! - getPoemNumber  Current HAIKU number WRONG!"
  7.     put a
  8.     put n
  9.     put c
  10.     return EMPTY
  11.   end if
  12.   set thecku to getaProp(a, n + 1)
  13.   if c > count(thecku) then
  14.     beep(1)
  15.     put "ERROR !!! - getPoemNumber  Current Text number WRONG!"
  16.     put a
  17.     put n
  18.     put c
  19.     return EMPTY
  20.   end if
  21.   if not voidp(e) then
  22.     return getaProp(getaProp(thecku, c), 1)
  23.   else
  24.     if getaProp(thecku, c) = EMPTY then
  25.       return EMPTY
  26.     else
  27.       return getaProp(getaProp(thecku, c), 1) & string(gextension)
  28.     end if
  29.   end if
  30. end
  31.  
  32. on getpoempos a, n, c
  33.   set table to [120, 270, 120, 260, 120, 120, 120]
  34.   set thenumber to count(a)
  35.   if (n + 1) > thenumber then
  36.     beep(1)
  37.     put "ERROR !!! - getPoemPos  Current HAIKU number WRONG!"
  38.     put a
  39.     put n
  40.     put c
  41.     return EMPTY
  42.   end if
  43.   set thecku to getaProp(a, n + 1)
  44.   if c > count(thecku) then
  45.     beep(1)
  46.     put "ERROR !!! - getPoemPos  Current Text number WRONG!"
  47.     put a
  48.     put n
  49.     put c
  50.     return EMPTY
  51.   end if
  52.   if getaProp(getaProp(thecku, c), 2) = EMPTY then
  53.     return getaProp(table, c)
  54.   else
  55.     return getaProp(getaProp(thecku, c), 2)
  56.   end if
  57. end
  58.  
  59. on showbiopicture lang
  60.   global gpbio, gphotonumber
  61. end
  62.  
  63. on getbioname a, n, c
  64.   global gextension
  65.   set thenumber to count(a)
  66.   if n > thenumber then
  67.     beep(1)
  68.     put "ERROR !!! - getBioName  Current HAIKU number WRONG!"
  69.     put a
  70.     put n
  71.     put c
  72.     return EMPTY
  73.   end if
  74.   set thebio to getaProp(a, n + 1)
  75.   if count(thebio) <> 6 then
  76.     beep(1)
  77.     put "ERROR !!! - Wrong gTBio list!"
  78.     put a
  79.     put n
  80.     put c
  81.     return EMPTY
  82.   end if
  83.   if c = "JN" then
  84.     return getaProp(thebio, 2) & string(gextension)
  85.   else
  86.     if c = "EN" then
  87.       return getaProp(thebio, 3) & string(gextension)
  88.     else
  89.       if c = "JB" then
  90.         return getaProp(thebio, 4) & string(gextension)
  91.       else
  92.         if c = "EB" then
  93.           return getaProp(thebio, 5) & string(gextension)
  94.         else
  95.           if c = "NK" then
  96.             return getaProp(thebio, 6) & string(gextension)
  97.           else
  98.             beep(1)
  99.             put "ERROR !!! - Wrong getBioName request code"
  100.             put a
  101.             put n
  102.             put c
  103.             return EMPTY
  104.           end if
  105.         end if
  106.       end if
  107.     end if
  108.   end if
  109.   beep(1)
  110.   put "ERROR !!! - Wrong getBioName code"
  111.   put a
  112.   put n
  113.   put c
  114.   return EMPTY
  115. end
  116.  
  117. on getbiophoto c
  118.   global gtpoem, gppoem, gtbio, gpbio, gcurrentnumber, gblenddraw, gbiophotonumber, gbiophoto, gextension
  119.   set a to getaProp(gtbio, gcurrentnumber + 1)
  120.   if count(a) <> 6 then
  121.     beep(1)
  122.     put "ERROR !!! - getBioPhoto  Current HAIKU number WRONG!"
  123.     put c
  124.     return EMPTY
  125.   end if
  126.   set thebiotype to getaProp(a, 1)
  127.   if thebiotype = EMPTY then
  128.     return EMPTY
  129.   end if
  130.   set a to getaProp(gpbio, thebiotype)
  131.   if c = "C" then
  132.     return count(a)
  133.   end if
  134.   if count(a) < (gbiophotonumber + 1) then
  135.     set gbiophotonumber to 0
  136.     beep(1)
  137.     put "ERROR !!! -getBioPhoto- Wrong gBioPhotoNumber!"
  138.   end if
  139.   set thebiophotolist to getaProp(a, gbiophotonumber + 1)
  140.   if count(thebiophotolist) <> 10 then
  141.     beep(1)
  142.     put "ERROR !!! -getBioPhoto- Wrong gTBio list!"
  143.     put c
  144.     return EMPTY
  145.   end if
  146.   if c = "P" then
  147.     return getaProp(thebiophotolist, 1) & string(gextension)
  148.   else
  149.     if c = "S" then
  150.       return getaProp(thebiophotolist, 2) & string(gextension)
  151.     else
  152.       if c = "PL" then
  153.         return the number of cast string(getaProp(thebiophotolist, 2) & string(gextension)) - 1
  154.       else
  155.         if c = "E" then
  156.           return getaProp(thebiophotolist, 5)
  157.         else
  158.           if c = "H" then
  159.             return getaProp(thebiophotolist, 3)
  160.           else
  161.             if c = "V" then
  162.               return getaProp(thebiophotolist, 4)
  163.             else
  164.               if c = "EH" then
  165.                 return getaProp(thebiophotolist, 6)
  166.               else
  167.                 if c = "EV" then
  168.                   return getaProp(thebiophotolist, 7)
  169.                 else
  170.                   if c = "EE" then
  171.                     return getaProp(thebiophotolist, 8)
  172.                   else
  173.                     if c = "EEH" then
  174.                       return getaProp(thebiophotolist, 9)
  175.                     else
  176.                       if c = "EEV" then
  177.                         return getaProp(thebiophotolist, 10)
  178.                       else
  179.                         beep(1)
  180.                         put "ERROR !!! -getBioPhoto- Wrong getBioName request code"
  181.                         put c
  182.                         return EMPTY
  183.                       end if
  184.                     end if
  185.                   end if
  186.                 end if
  187.               end if
  188.             end if
  189.           end if
  190.         end if
  191.       end if
  192.     end if
  193.   end if
  194.   beep(1)
  195.   put "ERROR !!! -getBioPhoto- Wrong getBioPhotoName code"
  196.   put c
  197.   return EMPTY
  198. end
  199.  
  200. on getphoto c
  201.   global gtpoem, gppoem, gtbio, gpbio, gcurrentnumber, gblenddraw, gphotonumber, gphoto, gextension
  202.   set a to getaProp(gppoem, gcurrentnumber + 1)
  203.   if c = "C" then
  204.     return count(a)
  205.   end if
  206.   if count(a) < (gphotonumber + 1) then
  207.     set gphotonumber to 0
  208.     beep(1)
  209.     put "ERROR !!! -getPhoto- Wrong gPhotoNumber!"
  210.   end if
  211.   set thephotolist to getaProp(a, gphotonumber + 1)
  212.   if count(thephotolist) <> 10 then
  213.     beep(1)
  214.     put "ERROR !!! -getPhoto- Wrong gPPoem list!"
  215.     put c
  216.     return EMPTY
  217.   end if
  218.   if c = "P" then
  219.     return getaProp(thephotolist, 1) & string(gextension)
  220.   else
  221.     if c = "S" then
  222.       return getaProp(thephotolist, 2) & string(gextension)
  223.     else
  224.       if c = "PL" then
  225.         return the number of cast string(getaProp(thephotolist, 2) & string(gextension)) - 1
  226.       else
  227.         if c = "E" then
  228.           return getaProp(thephotolist, 5)
  229.         else
  230.           if c = "H" then
  231.             return getaProp(thephotolist, 3)
  232.           else
  233.             if c = "V" then
  234.               return getaProp(thephotolist, 4)
  235.             else
  236.               if c = "EH" then
  237.                 return getaProp(thephotolist, 6)
  238.               else
  239.                 if c = "EV" then
  240.                   return getaProp(thephotolist, 7)
  241.                 else
  242.                   if c = "EE" then
  243.                     return getaProp(thephotolist, 8)
  244.                   else
  245.                     if c = "EEH" then
  246.                       return getaProp(thephotolist, 9)
  247.                     else
  248.                       if c = "EEV" then
  249.                         return getaProp(thephotolist, 10)
  250.                       else
  251.                         beep(1)
  252.                         put "ERROR !!! -getPhoto- Wrong getName request code"
  253.                         put c
  254.                         return EMPTY
  255.                       end if
  256.                     end if
  257.                   end if
  258.                 end if
  259.               end if
  260.             end if
  261.           end if
  262.         end if
  263.       end if
  264.     end if
  265.   end if
  266.   beep(1)
  267.   put "ERROR !!! -getPhoto- Wrong getPhotoName code"
  268.   put c
  269.   return EMPTY
  270. end
  271.